fittingTextSpPx

fun fittingTextSpPx(text: String, range: ResizeRangePx, innerWidthPx: Float, innerHeightPx: Float, textPaint: TextPaint, maxLines: Int? = null, maxLength: Int? = null, softWrap: Boolean = true, alignment: Layout.Alignment = Layout.Alignment.ALIGN_NORMAL, includePad: Boolean = true): Float

EN Largest font size (px) in range so text fits in the inner box (same idea as autoResizeTextSp). PT Maior tamanho de fonte em px para o texto caber na área útil.

EN Configure textPaint (typeface, flags, letterSpacing, etc.) like the target android.widget.TextView. PT Configure textPaint como no android.widget.TextView de destino.


fun fittingTextSpPx(context: Context, text: String, minSp: Float, maxSp: Float, stepSp: Float, innerWidthPx: Float, innerHeightPx: Float, textPaint: TextPaint, maxLines: Int? = null, maxLength: Int? = null, softWrap: Boolean = true, alignment: Layout.Alignment = Layout.Alignment.ALIGN_NORMAL, includePad: Boolean = true): Float

EN Twin of autoResizeTextSp with min/max/step as sp (Number overload in Compose). PT Equivalente a autoResizeTextSp com min/max/step em sp.


fun fittingTextSpPx(context: Context, text: String, min: ResizeBound, max: ResizeBound, innerWidthPx: Float, innerHeightPx: Float, textPaint: TextPaint, step: ResizeBound = resizeFixedSp(1f), maxLines: Int? = null, maxLength: Int? = null, softWrap: Boolean = true, alignment: Layout.Alignment = Layout.Alignment.ALIGN_NORMAL, includePad: Boolean = true): Float

EN Same as fittingTextSpPx but builds range from ResizeBounds via rangePx. PT Idem, construindo o intervalo com rangePx.